package com.zjgsu.nftplatform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author ahy231
 * @date 2022/3/4 10:44
 * @description
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("评论")
@TableName("`comment`")
public class Comment {
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty("主键")
    private Long id;
    @ApiModelProperty("用户id")
    private Long userId;
    @ApiModelProperty("用户名")
    private String username;
    @ApiModelProperty("用户头像url")
    private String userImg;
    @ApiModelProperty("评论")
    @TableField("`comment`")
    private String comment;
    @ApiModelProperty("商品id")
    private Long nftId;
    @ApiModelProperty("发表时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    private Date time;
    @ApiModelProperty("回复的评论id")
    private Long replyId;
}
